package com.wj.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName IndexController
 * @Author 蚂蚁课堂余胜军 QQ644064779 www.mayikt.com
 * @Version V1.0
 **/
@Controller
public class IndexController {
    @RequestMapping("/home")
    public String home() {
        return "home";
    }

    @ResponseBody
    @RequestMapping("/visit")
    public String mayikt() {
        return "不需要任何登录和权限都可以访问";
    }


    @ResponseBody
    @RequestMapping("/unauthorized")
    public String unauthorized(){
        return "你的角色暂时没有该权限，无法访问该接口";
    }
}
